#ifndef EXPENSE_H
#define EXPENSE_H

#include <iostream>
#include <time.h>
#include <string>
#include <sstream>
#include "Entry.h"

using namespace std;
//@author U095387X
class Expense: public Entry{
	//Attributess
private:
	time_t _timeOfRecord;
	e_method _method;
	e_category _category;
	string _remark;
	int encodeMethod(e_method method);
	e_method decodeMethod(int i);
	int encodeCategory(e_category category);
	e_category decodeCategory(int i);

public:
	Expense();
	Expense( string name, double amount, time_t timeOfRecord, e_method method, e_category category, string remark);
	Expense( string name, double amount, time_t timeOfRecord, time_t timeOfInput, e_method method, e_category category, string remark);
	Expense( string name, string objectString, string remark);
	string serialize();
	time_t getTimeOfRecord();
	e_method getMethod();
	e_category getCategory();
	string getRemark();

	bool operator<(Expense &b);
};

#endif